<?php

namespace app\api\validate;

use think\Validate;

class TillageDraw extends Validate
{
    protected $rule = [
        'account' => 'require',
        'type' => 'require',
        'amount' => 'require|gt:0',
        'bank_name' => 'require',
        'bank_account' => 'require',
        'bank_number' => 'require',
        'bank_address' => 'require',
        'wechat_name' => 'require',
        'wechat_account' => 'require',
        'wechat_img' => 'require',
        'alipay_name' => 'require',
        'alipay_account' => 'require',
        'alipay_img' => 'require',
        'pay_password' => 'require'
    ];

    protected $message = [
        'account.require' => '请选择提现账户',
        'type.require' => '请选择提现方式',
        'amount.require' => '请输入提现金额',
        'amount.gt' => '提现金额有误',
        'bank_name.require' => '请输入银行名称',
        'bank_account.require' => '请输入开户行姓名',
        'bank_number.require' => '请输入银行卡号',
        'bank_address.require' => '请输入开户行地址',
        'wechat_name.require' => '请输入微信真实姓名',
        'wechat_account.require' => '请输入微信账号',
        'wechat_img.require' => '请上传微信收款码',
        'alipay_name.require' => '请输入支付宝真实姓名',
        'alipay_account.require' => '请输入支付宝账号',
        'alipay_img.require' => '请上传支付宝收款码',
        'pay_password.require' => '请输入支付密码'
    ];

    protected $scene = [
        'bank' => ['account', 'type', 'amount', 'pay_password', 'bank_name', 'bank_account', 'bank_number', 'bank_address'],
        'wechat' => ['account', 'type', 'amount', 'pay_password', 'wechat_name', 'wechat_account', 'wechat_img'],
        'alipay' => ['account', 'type', 'amount', 'pay_password', 'alipay_name', 'alipay_account', 'alipay_img']
    ];

}